/**
 * 时间：2024-08-25
 * 作者：waygc
 * 描述：目录页
 * 
 * 改版履历
 * [20241017] 修改 ul 为 Menu 组件
 */
import React from "react";
import { Menu } from "antd";
import { Link } from "react-router-dom";
import { MENU_LIST } from "./../../lib/router";

class Menus extends React.Component {
	render () {
		return (
			<Menu
				defaultSelectedKeys={['1']}
				defaultOpenKeys={['sub1']}
				mode="inline"
				theme="dark"
			>
				{
					MENU_LIST.map(obj => {
						if (obj.menuIsShow) {
							return (
								<Menu.Item key={obj.id}>
									<Link to={`${obj.path}`}>{obj.label}</Link>
								</Menu.Item>
							)
						}
					})
				}
			</Menu>
		);
	}
}

export default Menus;
